pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let v : Vec<&str> = num_str.split(|c| {
        c == '(' || c == ')'
    }).collect();
    let mut num_from = u32::from_str_radix(v[0], v[1].parse::<u32>().unwrap()).expect("Invalid hexadecimal string");

    let mut result = String::new();
    while num_from > 0 {
        let remainder = num_from % to_base;
        let digit = std::char::from_digit(remainder, to_base).unwrap();
        result.push(digit);
        num_from /= to_base;
    }

    result.chars().rev().collect()
}
